package cn.kz.hrm.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author kz
 * @since 2020-07-14
 */
@TableName("t_pay")
public class Pay extends Model<Pay> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 支付价格
     */
    private Float price;
    /**
     * 购买订单生成的时间
     */
    private Date createtime;
    @TableField("course_id")
    private Long courseId;
    @TableField("user_id")
    private Long userId;
    /**
     * 是否支付成功。0为未支付，1为已经支付
     */
    private Integer state;
    /**
     * 订单为编号
     */
    private String ordernum;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(String ordernum) {
        this.ordernum = ordernum;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Pay{" +
        ", id=" + id +
        ", price=" + price +
        ", createtime=" + createtime +
        ", courseId=" + courseId +
        ", userId=" + userId +
        ", state=" + state +
        ", ordernum=" + ordernum +
        "}";
    }
}
